home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 583 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.2 KB

  1. Path: chronicle.mti.sgi.com!austern
  2. From: veldhuis@xs4all.nl (Wim Veldhuis)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: An Extra Virtual Destructor Question to Ponder
  5. Date: 28 Feb 1996 10:18:01 PST
  6. Organization: XS4ALL, networking for the masses
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <4h25rb$43e@news.xs4all.nl>
  9. References: <47t2s1$ivm@bmtlh10.bnr.ca>
  10. NNTP-Posting-Host: isolde.mti.sgi.com
  11. X-Original-Date: 28 Feb 1996 18:10:51 GMT
  12. X-Newsreader: NeoLogic News for OS/2 [version: 4.2]
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBVAwUBMTSca0y4NqrwXLNJAQG6/wH+K7DPPN6tZ8AMKeTxqQeOkli4MHmTlwps
  15.     Hh1/FTzaGgmuadp2EarwtHzP5lJRBDRpjMJ2EgszYXY+wlBnYUm4Hg==
  16.     =8Cn1
  17. Originator: austern@isolde.mti.sgi.com
  18.  
  19. In message <47voa1$969@gabi.gabi-soft.fr> - kanze@gabi-soft.fr (J. Kanze) 
  20. writes:
  21. :>
  22. :>
  23. :>john (j.d.) hickin (hickin@bnr.ca) wrote:
  24. :>
  25. :>|>     class X { public: X(); virtual ~X() = 0; };
  26. :>
  27. :>|> Has this been considered?
  28. :>
  29. :>In what way?  This has always been legal, and I see nothing in the
  30. :>present draft to change it.  I occasionally use the idiom to force a
  31. :>class to be abstract even when I want to provide default behavior for
  32. :>all of the member functions.
  33. Yes, but there is a difference between a normal member function and a dtor. 
  34. The normal memberfunction has to be called explicitly before it is invoked. 
  35. If the function is overridden, it is not called unless you explicitly call it 
  36. from the overridden version. Doing this will generate an error since their 
  37. actually is no implementation for the function called. With dtors, this is 
  38. different as all inherited dtors are automatically called when an object is 
  39. destructed. What you are saying here is that there is somewhere in the draft 
  40. a rule which states that if a dtor is declared pure virtual, a default 
  41. implementation (or none at all) is automatically created. Is this the case ?
  42.  
  43. Wim Veldhuis,
  44. veldhuis@xs4all.nl
  45. ---
  46. [ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
  47.                 newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  48.   comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  49.   Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  50.   Comments? mailto:std-c++-request@ncar.ucar.edu 
  51. ]
  52.